function login_method() {//登录方式 xuan选项卡
    let lis = document.querySelectorAll("#body2>.acc_ul li")
    let show = document.querySelectorAll("#body2>.input_te li")
    for (let i = 0; i < lis.length; i++) {
        lis[i].addEventListener("mouseover", function () {
            for (let a = 0; a < lis.length; a++) {
                lis[a].classList.remove("lis")
                show[a].classList.remove("show")
            }
            lis[i].classList.add("lis")
            show[i].classList.add("show")
        })
    }
}
login_method()

function management() {///登录输入管理
    let button = document.querySelector("#body2>.input_te button")
    button.addEventListener("click", function () {
        location.href = "../html/index.html"//跳转路径
    })
    let gain = document.querySelector("#body2>.input_te .gain")
    gain.addEventListener("click", function () {//获取验证码
        gain.value = "10"
        let timeID1 = setInterval(function () {
            gain.value--;
            if (gain.value == -1) {
                alert(439950)
                clearInterval(timeID1)
                gain.value = "重新获取验证码"
            }
        }, 1000)
    })
    let name_text = document.querySelectorAll("#body2>.input_te .name_text")
    name_text[0].addEventListener("focus", function () {
        this.style.background = "#ff6600"
        this.style.color = "blue"
    })
    name_text[0].addEventListener("blur", function () {
        let phone = this.value;
        if (phone.length < 11) {
            alert("请输入正确的手机号码")
        }
    })
    name_text[1].addEventListener("blur", function () {
        let phone = this.value;
        if (phone.length < 11) {
            alert("请输入正确的手机号码或者邮箱地址")
        }
    })
    name_text[1].addEventListener("focus", function () {
        this.style.background = "yellow"
        this.style.color = "blue"
    })
}
management()

function ceNTer() {//帮助中心
    let a2 = document.querySelector("#head>.a2")
    let helpCenter = document.querySelector(".helpCenter")

    let zhang = document.querySelector("#zhang")

    a2.addEventListener("click", function () {
        helpCenter.classList.add("helpCenters")

    })
    zhang.addEventListener("click", function () {
        helpCenter.classList.remove("helpCenters")

    })
}
ceNTer()

function information() {//个人信息保护政策
    let policy = document.querySelector("#body2>.privacy>.policy")
    policy.addEventListener("click", function () {
        location.href = "../html/个人信息保护政策.html"//跳转路径
    })
}
information()

let bank=document.querySelector("#body2>.privacy>.bank")
let shou =document.querySelector(".shou")
let tion=document.querySelector(".tion")
let regiseted=document.querySelector(".tion>.wits>.regiseted")
bank.addEventListener("click",function(){
    tion.classList.add("shou")
})
regiseted.addEventListener("click",function(){
    tion.classList.remove("shou")
})


// { <input type="text">
//     <input type="button" value="获取验证码" id="bnt">
//     <script>
        //获取元素
        // let bnt = document.querySelector("#bnt")
        // console.log(bnt);
        
        // //添加事件
        //     bnt.addEventListener("click",function(){
        //         // alert(1)
        //         //禁用验证码
        //         bnt.disabled = true
        //          //操作验证码
        //     //定义一个变量
        //     let num= 6;
        //     //
        //     bnt.value= "("+num+")获取验证码"
            
        //     let timeId = setInterval(function(){
        //         num--;
        //         bnt.value= "("+num+")获取验证码"
        //         //判断
        //         if(num==0){
        //             clearInterval(timeId)
        //                 bnt.disabled= false;
        //                 bnt.value="获取验证码"

        //         }
        //     },1000)
        //     }) 
